package cn.com.hwxt.dao;

import ch.qos.logback.classic.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;


@Component("jdbcDao")
public class JdbcDaoImpl implements JdbcDao {
    public void excute(String sql) throws RuntimeException {
        jdbcTemplate.execute(sql);
    }

    public int update(String sql) throws RuntimeException {
        return jdbcTemplate.update(sql);
    }

    public void insert(String sql) throws RuntimeException {
        jdbcTemplate.update(sql);
    }
    @Autowired
    private JdbcTemplate jdbcTemplate;
    private Logger log = (Logger) LoggerFactory.getLogger(this.getClass());
}
